<!doctype html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>文章 - 后台管理系统</title>
    <link rel="stylesheet" type="text/css" href="/admin/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/style.css">
    <link rel="stylesheet" type="text/css" href="/admin/css/font-awesome.min.css">
    <link rel="apple-touch-icon-precomposed" href="/admin/images/icon/icon.png">
    <link rel="shortcut icon" href="/admin/images/icon/favicon.ico">
    <script src="/admin/js/jquery-2.1.4.min.js"></script>
    <script src="/layer/layer.js"></script>
    <script>
        function del(id) {
            layer.confirm('您确定要删除？', {
                btn: ['是', '否'], //按钮
                icon: 2
            }, function () {
                layer.msg('删除成功', {icon: 1});
                location.href = "/back/article/delete?id=" + id;
            });

        }

        function findPage(pageNo) {
            $("#pageNo").val(pageNo);
            $("#fm1").submit();
        }
    </script>
</head>
<body class="user-select" style="margin: 0px;padding: 0px;">

<form id="fm1" action="/back/article/index" method="post" class="form-inline">
    <div>
        <ul class="breadcrumb" style="margin: 0px;">
            <li>文章管理</li>
            <li>文章查询</li>
        </ul>
    </div>
    <div class="row alert alert-info">
        <div class="form-group">
            <input type="hidden" id="pageNo" name="pageNo">
            <input type="text" id="articleTitle" name="articleTitle" value="${(articleInfo.articleTitle)!}"
                   class="form-control" placeholder="请输入文章的标题"/>
            <input type="text" id="categoryName" name="categoryName" value="${(articleInfo.categoryName)!}"
                   class="form-control" placeholder="请输入文章栏目"/>
            <input type="submit" value="查询" class="btn btn-info "/>
            <@shiro.hasPermission name="article:add">
                <a href="/back/article/loadAdd" class="btn btn-info ">增加文章</a>
            </@shiro.hasPermission>

        </div>
    </div>


    <div class="table-responsive">
            <#if info?? && info != "">
                <div class="alert alert-success alert-dismissable">
                    <button type="button" class="close" data-dismiss="alert"
                            aria-hidden="true">
                        &times;
                    </button>
                    ${(info)!}
                </div>
            </#if>

        <table class="table table-striped table-hover">
            <thead>
            <tr>
                <th>选择</th>
                <th>标题</th>
                <th>栏目</th>
                <th>日期</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody>
            <#list (pageBean.list)! as art>
            <tr>
                <td><input type="checkbox" class="input-control" name="checkbox[]" value=""/></td>
                <td class="article-title">${(art.articleTitle)!}</td>
                <td>${(art.categoryName)!}</td>
                <td>${(art.articleTime?datetime)!}</td>
                <td>
                    <@shiro.hasPermission name="article:edit">
                    <a href="/back/article/loadUpdate?id=${(art.id)!}">修改</a>
                    </@shiro.hasPermission>
                    <@shiro.hasPermission name="article:delete">
                        <a rel="6" onclick="del('${(art.id)!}')">删除</a>
                    </@shiro.hasPermission>
                </td>
            </tr>
            </#list>
            </tbody>
        </table>
    </div>
    <footer class="message_footer">
    <#--分页-->
    ${pageBean}
    </footer>
</form>
<script src="/admin/js/bootstrap.min.js"></script>
<script src="/admin/js/admin-scripts.js"></script>
</body>
</html>
